//
//  ThirtynineViewController.m
//  Depressed.domo
//
//  Created by rimi on 16/5/27.
//  Copyright © 2016年 薛涛. All rights reserved.
//

#import "ThirtynineViewController.h"

@interface ThirtynineViewController ()
@property (nonatomic ,strong)UIImageView *imageView;
@end

@implementation ThirtynineViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"图片动画";
    self.view.backgroundColor = [UIColor whiteColor];
    NSMutableArray *imagesArray = [NSMutableArray array];
    
    for (NSInteger index = 0; index < 138; index ++) {
        NSString *images = [NSString stringWithFormat:@"%ld.png",index];
        UIImage *image = [UIImage imageNamed:images];
        [imagesArray addObject:image];
        
    }
    _imageView = [[UIImageView alloc]initWithFrame:CRM(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
    /**播放的图片*/
    _imageView.animationImages = imagesArray;
    /**播放的时间*/
    _imageView.animationDuration = 2;
    [self.view addSubview:_imageView];
    /**开始播放*/
    [_imageView startAnimating];
}

@end
